#!/usr/bin/env python
# _*_ coding: utf-8 _*_
"""
author : DELL
project : ApiTestPlatform
date : 2021/11/19
"""

from apitest.utils.common import get_env_ip


# print(shop_host)

class Constant(object):
    xlb_host = get_env_ip('xlb_host')
    shop_host = get_env_ip('shop_host')
    video_host = get_env_ip('video_host')
    xlb_user = get_env_ip('user_login')
    user_pass = get_env_ip('user_pass')

    def user_login(self):
        # 用户登录
        return self.xlb_host

    def user_getBaseInfo(self):
        # 用户信息
        return self.xlb_host + r"?service=User.getBaseInfo"

    def user_getConfig(self):
        # 获取配置信息 post
        return self.xlb_host + r"?service=Home.getConfig"

    def user_getMyCoin(self):
        # 获取用户余额 post
        return self.xlb_host + r"?service=User.getMyCoin&uid=%s&token=%s"


    r'''
    
    https://video-server-api.xiangleba.com.cn/video/server/home/list/category/rec/v3?&xlbId=139268&category=%E7%BE%8E%E9%A3%9F&dtCode=2513022110aef1cd9df526fe8bf7db10
    get
    
    get
    https://api.staging.keneslive.com/?service=User.getBaseInfo&uid=726085&token=e548ad1923774bd9ca0856f6e7b63912&version_ios=1.1.622
    service	User.getBaseInfo
    uid	726085
    token	e548ad1923774bd9ca0856f6e7b63912
    version_ios	1.1.622
    返回json: {'ret': 200, 'data': {'code': 0, 'msg': '', 'info': [{'id': '763259', 'user_nicename': '手机用户4503', 'avatar': 'https://api.staging.keneslive.com/v1/user/avatar/md/763259', 'avatar_thumb': 'https://api.staging.keneslive.com/v1/user/avatar/md/763259', 'sex': None, 'signature': '这家伙很懒，什么都没留下', 'coin': '84', 'consumption': '40', 'votestotal': '0.00', 'login_type': None, 'province': '', 'city': '未获取到城市信息', 'birthday': '', 'last_login_time': '2021-11-25 15:42:22', 'create_time': '2021-10-12 13:57:30', 'code': 'UH47SE', 'token': 'db9d30a5b3f863968242c79741b9aded', 'ispwd': '1', 'isreg': '0', 'is_fist_time': '0', 'level': '1', 'level_anchor': '1'}]}, 'msg': ''}

    
    https://api.staging.keneslive.com/?service=Home.getConfig
    
    post
    https://api.staging.keneslive.com/?service=IDAuth.hasVerify&uid=726085&token=e548ad1923774bd9ca0856f6e7b63912
    service	IDAuth.hasVerify
uid	726085
token	e548ad1923774bd9ca0856f6e7b63912

post
https://api.staging.keneslive.com/?service=User.getMyCoin&uid=726085&token=e548ad1923774bd9ca0856f6e7b63912
service	User.getMyCoin
uid	726085
token	e548ad1923774bd9ca0856f6e7b63912

			
    '''
